package com.samg.learning.mine.rpc.invoke;


import com.samg.learning.mine.rpc.framework.ConsumerProxy;
import com.samg.learning.mine.rpc.service.HelloService;

/**
 * 服务的调用客户端
 *
 * @author liyebing created on 16/12/25.
 * @version $Id$
 */
public class RpcConsumerMain {

    public static void main(String[] args) throws Exception {
        HelloService service = ConsumerProxy.consume(HelloService.class, "127.0.0.1", 8083);
        String hello = service.sayHello("liyebing_" + 0);
        System.out.println(hello);
//        for (int i = 0; i < 5; i++) {
//            String hello = service.sayHello("liyebing_" + i);
//            System.out.println(hello);
//            Thread.sleep(1000);
//        }
    }

}
